﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Reflection;
using System.Text;

namespace FlyHorse.LIMS.DALFactory
{
    public partial class AbstractFactory
    {
        private static readonly string AssemblyPath = ConfigurationManager.AppSettings["AssemblyPath"];
        private static readonly string NameSpace = ConfigurationManager.AppSettings["NameSpace"];
        private static object CreateInstance(string className)
        {
            string AssemblyPath = ConfigurationManager.AppSettings["AssemblyPath"];
            string NameSpace = ConfigurationManager.AppSettings["NameSpace"];
            var assembly = Assembly.Load(AssemblyPath);
            object instance = assembly.CreateInstance(className);
            return instance;
        }
        //public static IUserInfoDal CreateUserInfoDal()
        //{
        //    string fullClassName = NameSpace + ".UserInfoDal";
        //   return CreateInstance(fullClassName) as IUserInfoDal;
        //}
    }
}
